package com.jdyfy.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

import static com.baomidou.mybatisplus.annotation.IdType.AUTO;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("announcements") //数据库中对应的表名
public class Announcement implements Serializable {

    //确保反序列化时能正确恢复对象的状态
    private static final long serialVersionUID = 1L;

    @TableId(type = AUTO)
    private Long announcementId; //公告编号

    private String announcementName; //公告名称

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deadline; // 响应文件递交截止时间

    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate announcementStartTime; //公告开始时间

    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate announcementEndTime; //公告结束时间

    private String announcementFileUrl; //公告文件地址

    private String announcementText; // 公告内容

    private String projectNumber; //项目编号

    private String pofc; //磋商地点


}
